package com.yyh.BookLendSystem.dao;

import java.sql.SQLException;

import API.JDBC.Ten26.DBHelper;

public class LeadDao {

	public void insert(Object rid, Object bid) throws SQLException {
		String sql = "insert into lend values("
				+ "seq_pub.nextval,?,?,sysdate,null,null)";
		DBHelper.update(sql, rid,bid);
		
	}
	public void lend(String name) throws SQLException {
		String sql  ="update book set nums=nums-1 where name = ?";
		DBHelper.update(sql,name);
	}

}
